<template>
  <view class="_fixed">
    <view class="_loading">
      <image :src="icon" class="icon" />

      <text>{{ title }}</text>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    icon: {
      default:
        "https://rhws.oss-cn-chengdu.aliyuncs.com/icon_v1/crun_loading2.gif",
    },
    title: {
      default: "加载中",
    },
  },
};
</script>

<style lang="stylus" scoped>
._fixed {
  display: flex;
  z-index: 98;
  height: 100vh;
  width: 100vw;
  align-items: center;
  justify-content: center;
  background: #f6f6f6;
}

._loading {
  border-radius: 10rpx;
  overflow: hidden;
  text-align: center;
  background: #fff;
  width: 180rpx;
  height: 180rpx;
  font-size: 28rpx;
  font-family: PingFangSC-Regular, PingFang SC;
  font-weight: 400;
  color: #333333;
  padding: 24rpx 20rpx;

  .icon {
    display: block;
    width: 100rpx;
    height: 100rpx;
    margin: auto;
  }
}
</style>